var selectCompleteOptions = [
    { label: "完成", value: '1' },
    { label: "未完成", value: '0' },
    { label: "完成30%", value: '0.3' },
    { label: "完成50%", value: '0.5' },
    { label: "完成80%", value: '0.8' },
    { label: "自定义", value: ''}
];
var selectjgxOptions = [
    { label: "完成", value: '0' },
    { label: "未完成", value: '-100' },
];

var calcMultiply = (num1, num2) => {
    let m = 0;
    try {
        m += num1.toString().split(".")[1].length;
    } catch (e) { }
    try {
        m += num2.toString().split(".")[1].length;
    } catch (e) { }
    return (Number(num1.toString().replace(".", "")) * Number(num2.toString().replace(".", ""))) / Math.pow(10, m);
};

export function getjgxcomplete(value) {
    var label = "";
    for (var i = 0; i < selectjgxOptions.length; i++) {
        if (selectjgxOptions[i].value == value) {
            label = selectjgxOptions[i].label;
            break;
        }
    }
    return label;
}
export function getcomplete(value) {
    var label = "";
    for (var i = 0; i < selectCompleteOptions.length; i++) {
        if (selectCompleteOptions[i].value == value) {
            label = selectCompleteOptions[i].label;
            break;
        }
    }
    return label;
}

export {
    selectCompleteOptions,
    selectjgxOptions,
    calcMultiply
}